home *** CD-ROM | disk | FTP | other *** search
/ IRIS Performer 2.2 Friends Demo / SGI IRIS Performer 2.2 Friends Demo.iso / friends / kegopolis / RunMe < prev    next >
Text File  |  1997-11-25  |  4KB  |  196 lines

  1. #!/bin/csh -f
  2.  
  3. if ($?H_SOUNDPLAYER == "0") then
  4.   setenv H_SOUNDPLAYER /usr/demos/all/HighEnd/noship/audio/runsound
  5. endif
  6.  
  7. set sound=no_sound
  8. set movement=mouse
  9. set pipes=single
  10. set pipes_arg=
  11.  
  12. @ i = 0
  13. while ($i < $#argv)
  14.   @ i = $i + 1
  15.   set arg = $argv[$i]
  16.  
  17.   if (("$arg" == "-h") || ("$arg" == "-help")) then
  18.     goto HELP
  19.   else if ("$arg" == "STOP") then
  20.     goto STOP
  21.   endif
  22.  
  23.   @ i = $i + 1
  24.   if ($i > $#argv) then
  25.     goto OUTBOUNDS
  26.   endif
  27.  
  28.   switch ($arg)
  29.  
  30.   case "-sound":
  31.     switch ($argv[$i])
  32.     case "no_sound":
  33.       set sound=$argv[$i]
  34.       breaksw
  35.     default:
  36.       echo "Didn't understand $arg $argv[$i]"
  37.       goto HELP
  38.       breaksw
  39.     endsw
  40.   breaksw
  41.  
  42.   case "-movement":
  43.     switch ($argv[$i])
  44.     case "mouse":
  45.       set movement=$argv[$i]
  46.       breaksw
  47.     default:
  48.       echo "Didn't understand $arg $argv[$i]"
  49.       goto HELP
  50.       breaksw
  51.     endsw
  52.   breaksw
  53.  
  54.   case "-pipes":
  55.     switch ($argv[$i])
  56.     case "single":
  57.       set pipes=$argv[$i]
  58.       breaksw
  59.     case "triple":
  60.       set pipes=$argv[$i]
  61.       @ i = $i + 1
  62.       if ($i > $#argv) then
  63.         goto OUTBOUNDS
  64.       endif
  65.       set pipes_arg=$argv[$i]
  66.       breaksw
  67.     case "seos":
  68.       set pipes=$argv[$i]
  69.       @ i = $i + 1
  70.       if ($i > $#argv) then
  71.         goto OUTBOUNDS
  72.       endif
  73.       set pipes_arg=$argv[$i]
  74.       breaksw
  75.     default:
  76.       echo "Didn't understand $arg $argv[$i]"
  77.       goto HELP
  78.       breaksw
  79.     endsw
  80.   breaksw
  81.  
  82.   default:
  83.     echo "Didn't understand $arg"
  84.     goto HELP
  85.     breaksw
  86.   endsw
  87. end
  88.  
  89. #### ADD CODE HERE
  90.  
  91. # don't need to check for legality here - already done above
  92. switch ($sound)
  93. case no_sound:
  94.   #### ADD CODE HERE
  95.   echo \* sound $sound
  96.   breaksw
  97. endsw
  98.  
  99. switch ($movement)
  100. case mouse:
  101.   #### ADD CODE HERE
  102.   echo \* movement $movement
  103.   breaksw
  104. endsw
  105.  
  106. switch ($pipes)
  107. case single:
  108.   #### ADD CODE HERE
  109.   set pipe_flag="-c 1"
  110.   echo \* pipes $pipes
  111.   breaksw
  112. case triple:
  113.   #### ADD CODE HERE
  114.   set pipe_flag=" -C $pipes_arg"
  115.   echo \* pipes $pipes $pipes_arg
  116.   breaksw
  117. case seos:
  118.   #### ADD CODE HERE
  119.   set pipe_flag="-C $pipes_arg -b 57,46,53.33"
  120.   echo \* pipes $pipes $pipes_arg
  121.   breaksw
  122. endsw
  123.  
  124. set orig_gamma=`gamma`
  125. echo orig_gamma $orig_gamma
  126.  
  127. setenv ORIG_DISPLAY $DISPLAY
  128. foreach d (`/usr/gfx/gfxinfo | grep Managed | awk '{print $2}' | sed 's/("//' | sed 's/")//' | xargs echo`)
  129.     setenv DISPLAY $d
  130. #### OVERRIDE GAMMA VALUE HERE
  131.     gamma 1.7
  132. end
  133. setenv DISPLAY $ORIG_DISPLAY
  134.  
  135. #### ADD CODE HERE
  136.  
  137. xconfirm -c -t 'Hit the s key to start the demo.' &
  138.  
  139. setenv LD_LIBRARY_PATH libs
  140.  
  141. # seos
  142. #./argoIII -C 2,0,1 -b 57,46,53.33  -E clear -e 4.3,0.0,0.0 -g 0 -j 1.0,1.2 -k 5 -l 2 -L -p -422.5,143.6,241.8   \
  143.   -Q 1 -S -3.5,13.0 -r 60 -u 0.9 -v 4,1  -X 1.0,1.5 -z 0.1,10000.0 -ydp,33,1 kegopolis.dp
  144.  
  145. #./argoIII -c 1 -b 80.0 -E clear -e 4.3,0.0,0.0 -g 0 -j 1.0,1.2 -k 5 -l 2 -L -p -422.5,143.6,241.8   \
  146.   -Q 1 -S -3.5,13.0 -r 60 -u 0.9 -v 1,1  -W 1280,1024 -X 1.0,1.5 -z 0.1,10000.0 -ydp,33,1 kegopolis.dp
  147.  
  148. #./argoIII $pipe_flag -b 80.0 -E clear -e 4.3,0.0,0.0 -g 0 -j 1.0,1.2 -k 5 -l 2 -L -p -422.5,143.6,241.8   \
  149.   -Q 1 -S -3.5,13.0 -r 60 -u 0.9 -v 1,1 -X 1.0,1.5 -z 0.1,10000.0 -ydp,33,1 kegopolis.dp
  150.  
  151. ./argoIII.5 -b 80.0 -E clear -e 4.3,0.0,0.0 -g 0 -j 1.0,1.2 -k 5 -l 2 -L -p -422.5,143.6,241.8 -Q 1 -S -3.5,13.0 -r 60 -u 0.9 -v 1,1  -X 1.0,1.5 -z 0.1,10000.0 -ymedit,33,1 -W 1280,1024 kegopolis.dp
  152.  
  153. setenv ORIG_DISPLAY $DISPLAY
  154. foreach d (`/usr/gfx/gfxinfo | grep Managed | awk '{print $2}' | sed 's/("//' | sed 's/")//' | xargs echo`)
  155.     setenv DISPLAY $d
  156.     gamma $orig_gamma
  157. end
  158. setenv DISPLAY $ORIG_DISPLAY
  159.  
  160. echo "Normal exit"
  161. exit
  162.  
  163. ABORT:
  164.   #### ADD CODE HERE
  165.   echo "ABORT exit"
  166.   goto EXIT
  167.  
  168. STOP:
  169.   #### ADD CODE HERE
  170.   echo "STOP exit"
  171.   exit
  172.  
  173. HELP:
  174.   echo "Usage:"
  175.   echo "\t$0\t-h | -help"
  176.   echo "\t$0\tSTOP"
  177.   echo "\t$0\t[-sound no_sound]"
  178.   echo "\t\t[-movement mouse]"
  179.   echo "\t\t[-pipes single | triple <Order (L to R) - 0,1,2> | seos <Order (L to R) - 0,1,2>]"
  180.   echo
  181.   echo "\tThe first sub option listed in each option is the default"
  182.   echo "HELP exit"
  183.   goto EXIT
  184.  
  185. OUTBOUNDS:
  186.   echo "Not enough arguments"
  187.   echo "OUTBOUNDS exit"
  188.   goto EXIT
  189.  
  190. EXIT:
  191.   echo
  192.   echo "Hit enter to continue."
  193.   stty -echo
  194.   set input=$<
  195.   exit
  196.